package com.hdl.dao.impl;

import org.springframework.jdbc.core.JdbcTemplate;

import com.hdl.dao.CommentDao;
import com.hdl.entity.MallComment;
import com.hdl.util.Druidutils;

public class CommentDaoImpl implements CommentDao{

	
	private JdbcTemplate template = new JdbcTemplate(Druidutils.getDataSource());
	
	@Override
	public void addComment(MallComment comment) {
		
		//定义sql语句
		String sql = "insert into MALL_COMMENT values(null,?,?,?,?) ";
		template.update(sql,comment.getHdlUserId(),comment.getMallCommentMessage(),comment.getMallCommentTime(),comment.getMallProductId());
	}

}
